<template>
	<view class="con">
		<view class="item" v-for="(item,index) in list" :key="index">
			<image class="item__icon" src="./static/icon.png" mode=""></image>
			<view class="item__right">
				<view class="item__reason">
					{{item.reason}}
					<view class="item__num" v-if="item.abount==1">
						+{{item.value}}
					</view>
					<view class="item__num" v-if="item.abount==2" style="color: #333;">
						-{{item.value}}
					</view>
				</view>
				<view class="item__time">
					{{item.createtime}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {ourScore} from '@/api/integral.js'
	export default {
		data() {
			return {
				list:[],
				page:1,
				last_page:1
			};
		},
		onLoad() {
			ourScore({page:this.page}).then(res=>{
				console.log(res)
				this.last_page=res.data.data.last_page
				this.list=[...this.list,...res.data.data.data]
			})
		}
	}
</script>

<style lang="scss">
.con{
	border-top: #FCFCFD solid 2rpx;
}
.item{
	padding: 37rpx 30rpx 36rpx;
	border-bottom: #FCFCFD solid 2rpx;
	display: flex;
	align-items: center;
	justify-content: space-between;
	&__icon{
		width: 74rpx;
		height: 74rpx;
		margin-right: 17rpx;
	}
	&__right{
		flex: 1;
		height: 66rpx;
		padding: 3rpx 0 5rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	&__reason{
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #333333;
		line-height: 26rpx;
	}
	&__num{
		font-size: 33rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #FA4600;
		line-height: 33rpx;
	}
	&__time{
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 300;
		color: #A2A1A0;
		line-height: 24rpx;
	}
}
</style>
